#ifndef VISION_LAMP_DETECTOR_H_
#define VISION_LAMP_DETECTOR_H_

#include <core/macros.h>
#include <core/synced_lamp_centroids.h>

#include "camera_abstractor/camera_abstractor.h"
#include "fish_eye_restorer/fish_eye_restorer_function_lut.h"
#include "lamp_detector/lamp_detector.h"

class VisionSystem {
public:
  VisionSystem(SyncedLampCentroids *lamp_centroids);
  ~VisionSystem();

  void operator()();
private:
  static const int kRestoredImageWidth = 1400;
  static const int kRestoredImageHeight = 1400;
  static const int kThreshold = 250;
  static const float kHorizontalFieldOfView = M_PI * 103 / 180;

  CameraAbstractor camera_abstractor_;
  FishEyeRestorerFunctionLUT *fish_eye_restorer_function_lut_;
  LampDetector lamp_detector_;

  uint32_t **captured_image_;
  int **restored_image_;

  SyncedLampCentroids *lamp_centroids_;

  DISALLOW_COPY_AND_ASSIGN(VisionSystem);
};

#endif
